home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / os2 / cenv2_19.arj / BORDER.CMM < prev    next >
Text File  |  1994-03-04  |  681b  |  31 lines

  1. //*** Border.cmm - Draw a border of asterisks on the screen
  2. //*** ver.1
  3.  
  4. if defined(_WINDOWS_)
  5.    ScreenSize(30,30);
  6.  
  7. DrawAsteriskBorder();
  8. ScreenCursor(1,1);
  9. getch();
  10.  
  11. DrawAsteriskBorder()
  12. {
  13.    size = ScreenSize();
  14.    ScreenClear();
  15.    // draw top border
  16.    ScreenCursor(0,0);
  17.    for ( col = 0; col < size.col; col++ )
  18.       putchar('*');
  19.    // draw bottom border
  20.    ScreenCursor(0,size.row-2);
  21.    for ( col = 0; col < size.col; col++ )
  22.       putchar('*');
  23.    // draw left and right borders
  24.    for ( row = 0; row < size.row - 1; row++ ) {
  25.       ScreenCursor(0,row);
  26.       putchar('*');
  27.       ScreenCursor(size.col-1,row);
  28.       putchar('*');
  29.    }
  30. }
  31.